<template>
  <div>
    <!-- <input type="text" v-model="value" placeholder="输入" v-bind="$attrs" /> -->
    {{ vv }}
    <input type="text" :value="vv" @input="onInput" />
  </div>
</template>

<script>
  export default {
    inheritAttrs: true,
    props: {
      val: {
        type: String,
        default: ''
      }
    },
    data() {
      return {
        vv: ''
      };
    },
    // emits: ['input'],
    methods: {
      onInput(e) {
        const { value } = e.target;
        this.vv = value;
        this.$emit('input', value);
      }
    }
  };
</script>

<style></style>
